package Service;

import Dao.CourseDao;
import Pojo.Course;
//import Pojo.SelectCoure;
import Pojo.Student;
import Service.Service;
import Servlet.Serviceimply;
import org.junit.Test;

import java.util.List;


public class ServiceTest {
    Service service=new Serviceimply();
    CourseService courseService=new Courseimply();
    @Test
    public void test(){
        service.add(new Student(7,"猴哥","hg","22","福州",0));
    }
    @Test
    public void test1(){
        if(service.existBysnameAndpwdPwd("1","1")){
            System.out.println("密码存在");
        }else{
            System.out.println("密码不存在");
        }
    }
    @Test
    public void test2(){
        List<Course> courses = courseService.queryCourseTable();
        courses.forEach(System.out::println);
    }
//    @Test
//    public void test3(){
//        CourseDao courseDao=new Dao.Courseimply();
//        courseDao.add(new Course(2,"语文","14.00-18.00","教学楼"));
//    }
    @Test
    public void test55(){
        Service service=new Serviceimply();
        CourseService courseService=new Courseimply();
        List<Course> courses = courseService.queryStudentCourseTable(1);
        courses.forEach(System.out::println);
    }

}
